import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getMkBasePath();

/**
 * 订单卡券消费记录
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'id 主键',userCardCode:'卡号',orderId:'订单编号',reduceMoney:'抵扣金额xx元',increaseBonus:'增加XX积分',reduceBonus:'减少XX积分',deptid:'机构编号',cardPkId:'卡主键',cardName:'卡描述'}
 **/
 
//普通查询 条件之间and关系  
export const listOrderCard = params => { return axios.get(`${base}/mk/mng/computed/orderCard/list`, { params: params }); };

//模糊查询订单卡券消费记录 条件之间or关系  
//export const listOrderCardKey = params => { return axios.get(`${base}/mk/mng/computed/orderCard/listKey`, { params: params }); };

//删除一条订单卡券消费记录 params={id:'id 主键'}
export const delOrderCard = params => { return axios.post(`${base}/mk/mng/computed/orderCard/del`,params); };

//批量删除订单卡券消费记录  params=[{id:'id 主键'}]
export const batchDelOrderCard = params => { return axios.post(`${base}/mk/mng/computed/orderCard/batchDel`, params); };

//修改一条订单卡券消费记录记录
export const editOrderCard = params => { return axios.post(`${base}/mk/mng/computed/orderCard/edit`, params); };

//新增一条订单卡券消费记录
export const addOrderCard = params => { return axios.post(`${base}/mk/mng/computed/orderCard/add`, params); };